- Colorado EnviroScreen
- Questions
- Why was it created
- How was it created
- Role of the geospatial analyst
2022-09-09
# read in data
d1 <- read.csv("multiTimeline.csv",skip = 2)
names(d1) <- c("week","ej")
# generate linear model
n = 1:length(d1$ej)
m1 = lm(d1$ej~n)
# plot data
p1 <- plot_ly(data = d1, x =~week, y =~ej,
type = 'scatter',
mode = 'lines+markers',
name= "ej")%>%
add_lines(data = d1, x = ~week, y =predict(m1),
type = 'line',
name="Linear Model")